//
//  ZFSearchViewController.swift
//  map
//
//  Created by fyzq on 2024/1/26.
//

import UIKit
import GKNavigationBarSwift
import Hero
import RxSwift
class ZFSearchViewController: ZFBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        gk_navTitle = "搜索"
        self.hero.isEnabled = true
        setNavigation()
        setUI()
    }
    
    
    fileprivate func setUI(){
        
        let textfield =  ZFTextField()
        textfield.placeholder = "搜索"
        textfield.hero.id = "ABC123"
        view.addSubview(textfield)
        textfield.snp.makeConstraints { make in
            make.top.equalTo(100)
            make.left.equalTo(20)
            make.right.equalTo(-20)
            make.height.equalTo(44)
        }
        textfield.backgroundColor = R.color.color_66()
        
    }
   
    
   

 

}


extension ZFSearchViewController{
    
    fileprivate func setNavigation(){
        
        let backBtn = UIButton(type: UIButton.ButtonType.custom)
        backBtn.setTitle("返回", for: UIControl.State.normal)
        backBtn.setTitleColor(.red, for: UIControl.State.normal)
        gk_navLeftBarButtonItem = UIBarButtonItem(customView: backBtn)
        backBtn.rx.tap.subscribe(onNext:{[weak self]_ in
            guard let self = self else {return}
            self.dismiss(animated: true)
        }).disposed(by: dis)
        
    }
}
